<!-- Global Site Tag (gtag.js) - Google Analytics -->
{%- assign adwords = storeConfig.google_adwords_trace_id | strtoarray -%}
{%- assign tracking = storeConfig.google_analytics_trace_id | strtoarray -%}
{%- assign conversion = storeConfig.google_conversion_id | strtoarray -%}
{%- assign page_view_conversion_ids = storeConfig.google_page_view_conversion_id | strtoarray -%}
{%- assign view_centent_conversion_ids = storeConfig.google_view_centent_conversion_id | strtoarray -%}
{%- assign search_conversion_ids = storeConfig.google_search_conversion_id | strtoarray -%}
{%- assign add_to_cart_conversion_ids = storeConfig.google_add_to_cart_conversion_id | strtoarray -%}
{%- assign initcheckout_conversion_ids = storeConfig.google_initcheckout_conversion_id | strtoarray -%}
{%- assign add_address_information_conversion_ids = storeConfig.google_add_address_information_conversion_id | strtoarray -%}
{%- assign add_shipping_information_conversion_ids = storeConfig.google_add_shipping_information_conversion_id | strtoarray -%}
{%- assign add_payment_information_conversion_ids = storeConfig.google_add_payment_information_conversion_id | strtoarray -%}


{%- if tracking.0 -%}
  {%- assign default_tracking_id = tracking.0 -%}
{%- elsif adwords.0 -%}
  {%- assign default_tracking_id = adwords.0 -%}
{%- endif -%}
{% for adword_id in adwords %}
  <script async src="https://www.googletagmanager.com/gtag/js?id={{ adword_id }}"></script>
{% endfor %}

{% for tracking_id in tracking %}
  <script async src="https://www.googletagmanager.com/gtag/js?id={{ tracking_id }}"></script>
{% endfor %}
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());

    {%- if tracking -%}
    {% for pixel in tracking %}
    gtag('config', '{{ pixel }}');
    {%- endfor -%}
    {%- endif -%}
    gtag('set', {'currency': '{{ base_currency.standard_code }}'});
    gtag('require', 'ec');

    {%- if adwords -%}
    {% for pixel in adwords %}
    gtag('config', '{{ pixel }}');
    {%- endfor -%}
    {%- endif -%}
    
    {%- if page_view_conversion_ids -%}
    {% for send_to_id in page_view_conversion_ids %}
    gtag('event', 'conversion', {'send_to': '{{send_to_id}}'});
    {%- endfor -%}
    {%- endif -%}

    {%- if template == 'product_detail' -%}

        {% if tracking %}
        gtag('event', 'view_item', {
            'send_to': [{{ tracking | strquotes }}],
            'items': [{
                "item_id": "{{ product.id }}",
                "item_name": _GET_C_SETTING_('product').title,
                "quantity": 1,
                "price": "{{ product.variant.price }}"
            }],
            "value":"{{product.variant.price}}",
            "currency":"{{currency.standard_code}}"
        });
        {%- endif -%}

        {%- if view_centent_conversion_ids -%}
        {% for send_to_id in view_centent_conversion_ids %}
        gtag('event', 'conversion', {'send_to': '{{send_to_id}}'});
        {%- endfor -%}
        {%- endif -%}

        {% if adwords %}
        var pcat = []
        {% if product.product_type %}
            pcat.push('{{product.product_type | filter_string_format}}');
        {% endif %}
        gtag('event', 'view_item', {
            'send_to': [{{ adwords | strquotes }}],
            'ecomm_pagetype': 'product',
            'ecomm_pname':_GET_C_SETTING_('product').title,
            'ecomm_pcat': pcat,
            'ecomm_prodid': ["{{ product.spu }}"],
            'ecomm_pvalue': '{{ product.variant.price }}',
            'ecomm_totalvalue': '{{ product.variant.price }}',
        });
        {%- endif -%}

    {% elsif template == 'search_detail' and search.keywords %}

        {%- if tracking -%}
        gtag('event', 'search', {
        'search_term': '{{search.keywords | filter_string_format}}'
        });
        {%- endif -%}

        {%- if search_conversion_ids -%}
        {% for send_to_id in search_conversion_ids %}
        gtag('event', 'conversion', {'send_to': '{{send_to_id}}'});
        {%- endfor -%}
        {%- endif -%}

        {% if adwords %}
        var pcat =[];
        var prodid =[];
        {%- if search -%}
        {%- for product in search.products -%}
        pcat.push('{{product.product_type | filter_string_format}}');
        prodid.push("{{ product.spu | escape}}");
        {%- endfor -%}
        {%- endif -%}
        gtag('event', 'search', {
        'send_to': [{{ adwords | strquotes }}], 'view_search_results': '{{search.keywords | filter_string_format}}',
        'ecomm_pagetype': 'searchresults',
        'ecomm_pcat': pcat,
        'ecomm_prodid': prodid,
        });
        {%- endif -%}

    {% elsif template == 'collection_detail' %}
    
        gtag('event', 'page_view_event', {
            'send_to': [{{ tracking | strquotes }}], 
            'event_category':'{{ template }}',
            'event_label':'{{collection.title | filter_string_format}}',
            'value':'{{collection.id}}'
        });

        {%- if  tracking -%}
        gtag('event', 'view_item_list', {
            'item_list_id':"{{collection.id}}",
            'item_list_name':"{{collection.title}}",
            'items': [
                {% for product in collection.products %}
                {
                    "item_id": "{{ product.id }}",
                    "item_name":'{{product.title | filter_string_format}}',
                    "quantity": 1,
                    "price": "{{ product.variant.price }}"
                },
                {% endfor %}
            ]
        });
        {%- endif -%}

        {%- if adwords -%}
        var pcat =[];
        var prodid =[];
        {%- if collection.products -%}
        {%- for product in collection.products -%}
        pcat.push("{{ product.product_type | escape}}");
        prodid.push("{{ product.spu | escape}}");
        {%- endfor -%}
        {%- endif -%}
        gtag('event', 'view_item_list', {
            'send_to': [{{ adwords | strquotes }}],
            'ecomm_pagetype': 'category',
            'ecomm_pcat': pcat,
            'ecomm_prodid': prodid,
        });
        {%- endif -%}

    {%- elsif controller == 'order' and action == 'success' -%}

        {%- if order -%}
        {%- if  tracking -%}
        gtag('event', 'purchase', {
            'send_to': [{{ tracking | strquotes }}],
            'transaction_id': '{{ order.order_number }}',
            {%- if storeConfig.google_sales_goods_amount -%}
            'value': "{{ order.current_subtotal_price| plus:order.current_coupon_price | plus:order.current_promotion_price }}",
            {%- else -%}
            'value': '{{ order.total_price }}',
            {%- endif -%}
            'currency': '{{ order.currency_code }}',
            'tax': '{{ order.current_tax_price }}',
            'shipping': '{{ order.current_shipping_price }}',
            'coupon': '{{ order.current_coupon_price }}',
            'items': [
                {%- for product in order.products -%}
                {
                    "item_id": "{{ product.id }}",
                    "item_name":'{{product.product_title | filter_string_format}}',
                    "quantity": "{{ product.quantity }}",
                    {%- if storeConfig.google_sales_goods_amount -%}
                    "price": "{{ product.discount_price }}"
                    {%- else -%}
                    "price": "{{ product.price }}"
                    {%- endif -%}

                },
                {%- endfor -%}
            ]
        });
        {%- endif -%}

        {%- if adwords -%}
        var pcat =[];
        var prodid =[];
        var pname =[];
        {%- if order.products -%}
        {%- for product in order.products -%}
            {% if product.product_type %}
                pcat.push("{{ product.product_type | escape}}");
            {% endif %}
            pname.push(`{{ product.product_title}}`);
            prodid.push("{{ product.spu | escape}}");
        {%- endfor -%}
        {%- endif -%}
        gtag('event', 'purchase', {
            'send_to': [{{ adwords | strquotes }}],
            'ecomm_pagetype': 'purchase',
            'ecomm_pcat': pcat,
            'ecomm_pname':pname,
            'ecomm_prodid': prodid,
            {%- if storeConfig.google_sales_goods_amount -%}
            'ecomm_pvalue': '{{ order.current_subtotal_price | plus:order.current_coupon_price | plus:order.current_promotion_price}}',
            'ecomm_totalvalue': '{{ order.current_subtotal_price | plus:order.current_coupon_price | plus:order.current_promotion_price}}',
            {%- else -%}
            'ecomm_pvalue': '{{ order.total_price }}',
            'ecomm_totalvalue': '{{ order.total_price }}'
            {%- endif -%}
        });
        {%- endif -%}

        {%- if conversion -%}
        gtag('event', 'conversion', {
            'send_to': [{{ conversion | strquotes }}],
            {% if storeConfig.google_sales_goods_amount %}
            'value': "{{ order.current_subtotal_price | plus:order.current_coupon_price | plus:order.current_promotion_price}}",
            {% else %}
            'value': '{{ order.total_price }}',
            {% endif %}
            "currency": "{{ order.currency_code }}",
            "transaction_id": "{{ order.order_number }}"
        });
        {% for send_to_id in conversion %}
        gtag('event', 'conversion', {
            'send_to': "{{send_to_id}}",
            {% if storeConfig.google_sales_goods_amount %}
            'value': "{{ order.current_subtotal_price | plus:order.current_coupon_price | plus:order.current_promotion_price}}",
            {% else %}
            'value': '{{ order.total_price }}',
            {% endif %}
            "currency": "{{ order.currency_code }}",
            "transaction_id": "{{ order.order_number }}"
        });
        {%- endfor -%}
        {%- endif -%}

        {%- endif -%}

    {%- elsif template == 'order_payment_gateway' and order.payment_type == 'offlinepay' and storeConfig.is_offlinepay_purchase_pixel == '1' -%}

        {%- if order -%}
        {%- if  tracking -%}
        gtag('event', 'purchase', {
            'send_to': [{{ tracking | strquotes }}],
            'transaction_id': '{{ order.order_number }}',
            {%- if storeConfig.google_sales_goods_amount -%}
            'value': "{{ order.current_subtotal_price| plus:order.current_coupon_price | plus:order.current_promotion_price }}",
            {%- else -%}
            'value': '{{ order.total_price }}',
            {%- endif -%}
            'currency': '{{ order.currency_code }}',
            'tax': '{{ order.current_tax_price }}',
            'shipping': '{{ order.current_shipping_price }}',
            'coupon': '{{ order.current_coupon_price }}',
            'items': [
                {%- if order.products -%}
                {%- for product in order.products -%}
                {
                    "item_id": "{{ product.id }}",
                    "item_name":'{{product.product_title | filter_string_format}}',
                    "quantity": "{{ product.quantity }}",
                    {%- if storeConfig.google_sales_goods_amount -%}
                    "price": "{{ product.discount_price }}"
                    {%- else -%}
                    "price": "{{ product.price }}"
                    {%- endif -%}

                },
                {%- endfor -%}
                {%- endif -%}
            ]
        });
        {%- endif -%}

        {%- if adwords -%}
        var pcat =[];
        var prodid =[];
        var pname =[];
        {%- if order.products -%}
        {%- for product in order.products -%}
            {% if product.product_type %}
                pcat.push("{{ product.product_type | escape}}");
            {% endif %}
            pname.push(`{{ product.product_title}}`);
            prodid.push("{{ product.spu | escape}}");
        {%- endfor -%}
        {%- endif -%}
        gtag('event', 'purchase', {
            'send_to': [{{ adwords | strquotes }}],
            'ecomm_pagetype': 'purchase',
            'ecomm_pcat': pcat,
            'ecomm_pname':pname,
            'ecomm_prodid': prodid,
            {%- if storeConfig.google_sales_goods_amount -%}
            'ecomm_pvalue': '{{ order.current_subtotal_price | plus:order.current_coupon_price | plus:order.current_promotion_price}}',
            'ecomm_totalvalue': '{{ order.current_subtotal_price | plus:order.current_coupon_price | plus:order.current_promotion_price}}',
            {%- else -%}
            'ecomm_pvalue': '{{ order.total_price }}',
            'ecomm_totalvalue': '{{ order.total_price }}'
            {%- endif -%}
        });
        {%- endif -%}

        {%- if conversion -%}
        gtag('event', 'conversion', {
            'send_to': [{{ conversion | strquotes }}],
            {% if storeConfig.google_sales_goods_amount %}
            'value': "{{ order.current_subtotal_price | plus:order.current_coupon_price | plus:order.current_promotion_price}}",
            {% else %}
            'value': '{{ order.total_price }}',
            {% endif %}
            "currency": "{{ order.currency_code }}",
            "transaction_id": "{{ order.order_number }}"
        });
        {% for send_to_id in conversion %}
        gtag('event', 'conversion', {
            'send_to': "{{send_to_id}}",
            {% if storeConfig.google_sales_goods_amount %}
            'value': "{{ order.current_subtotal_price | plus:order.current_coupon_price | plus:order.current_promotion_price}}",
            {% else %}
            'value': '{{ order.total_price }}',
            {% endif %}
            "currency": "{{ order.currency_code }}",
            "transaction_id": "{{ order.order_number }}"
        });
        {%- endfor -%}
        {%- endif -%}
        {%- endif -%}
    {%- elsif template == 'blog_detail' -%}
        {%- if tracking -%}
        gtag('event', 'page_view_event', {
            'send_to': [{{ tracking | strquotes }}], 
            'event_category':'{{ template }}',
            'event_label':'{{blog.title | filter_string_format}}',
            'value':'{{blog.id}}'
        });
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', '{{template}}', {
            'send_to': [{{ adwords | strquotes }}]
        });
        {%- endif -%}

    {%- elsif template == 'page_detail' -%}
        {%- if tracking -%}
        gtag('event', 'page_view_event', {
            'send_to': [{{ tracking | strquotes }}], 
            'event_category':'{{ template }}',
            'event_label':'{{page.title | filter_string_format}}',
            'value':'{{page.id}}'
        });
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', '{{template}}', {
            'send_to': [{{ adwords | strquotes }}]
        });
        {%- endif -%}
    {%- elsif template == 'topic_detail' -%}
        {%- if tracking -%}
        gtag('event', 'page_view_event', {
            'send_to': [{{ tracking | strquotes }}], 
            'event_category':'{{ template }}',
            'event_label':'{{topic.title | filter_string_format}}',
            'value':'{{topic.id}}'
        });
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', '{{template}}', {
            'send_to': [{{ adwords | strquotes }}]
        });
        {%- endif -%}
    {%- elsif template == 'promotion_detail' -%}
        {%- if tracking -%}
        gtag('event', 'page_view_event', {
            'send_to': [{{ tracking | strquotes }}], 
            'event_category':'{{ template }}',
            'event_label':'{{promotion.promotion_name | filter_string_format}}',
            'value':'{{promotion.id}}'
        });
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', '{{template}}', {
            'send_to': [{{ adwords | strquotes }}]
        });
        {%- endif -%}
    {%- elsif template == 'coupons_detail' -%}
        {%- if tracking -%}
        gtag('event', 'page_view_event', {
            'send_to': [{{ tracking | strquotes }}], 
            'event_category':'{{ template }}',
            'event_label':'{{coupon.coupon_name | filter_string_format}}',
            'value':'{{coupon.id}}'
        });
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', '{{template}}', {
            'send_to': [{{ adwords | strquotes }}]
        });
        {%- endif -%}
    {% else %}
        {%- if tracking -%}
        gtag('event', 'page_view_event', {
            'send_to': [{{ tracking | strquotes }}],
            'event_category':'{{ template }}'
        });
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', '{{template}}', {'send_to': [{{ adwords | strquotes }}]});
        {%- endif -%}
    {% endif %}

   

    function callback_google_add_to_cart(ecdata) {
        {% if tracking  %}
        gtag('event', 'add_to_cart', {
  			'send_to': [{{ tracking | strquotes }}], 
  			'items': [{
  				"id": ecdata['ec_data_spu'],
                "category": ecdata['ec_data_category'],
                "variant": ecdata['ec_data_sku_name'] || ecdata['ec_data_sku_code'],
                "item_name": ecdata['ec_data_sku_name'] || ecdata['ec_data_sku_code'],
                "list_position": 1,
                "quantity": ecdata['ec_data_quantity'],
                "price":  formatMoney(ecdata['ec_data_price'],_GET_C_SETTING_('base_currency'),'',false),
            }],
            "value":  formatMoney( ecdata['ec_data_price'] *  ecdata['ec_data_quantity'],_GET_C_SETTING_('base_currency'),'',false),
            "currency":"{{currency.standard_code}}"
        });
        {%- endif -%}
        {% if adwords %}
        var pcat =[];
        var prodid =[];
        var pname =[];
        if(ecdata['ec_data_category']){
            pcat.push(ecdata['ec_data_category']);
        }
        prodid.push(ecdata['ec_data_spu']);
        gtag('event', 'add_to_cart', {
            'send_to': [{{ adwords | strquotes }}],
            'ecomm_pagetype': 'cart',
            'ecomm_pname':ecdata['ec_data_name'],
            'ecomm_pcat': pcat,
            'ecomm_prodid': prodid,
            'ecomm_pvalue': formatMoney(ecdata['ec_data_price'],_GET_C_SETTING_('base_currency'),'',false),
            'ecomm_totalvalue': ecdata['ec_data_price'] * ecdata['ec_data_quantity']
        });
        {%- endif -%}
        
        {%- if add_to_cart_conversion_ids -%}
        {% for send_to_id in add_to_cart_conversion_ids %}
        gtag('event', 'conversion', {'send_to': '{{send_to_id}}'});
        {%- endfor -%}
        {%- endif -%}
    }


    function callback_google_generate_lead() {
        {%- if tracking -%}
        gtag('event', 'generate_lead', {
  			'send_to': [{{ tracking | strquotes }}]
  		});
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', 'generate_lead', {
  			'send_to': [{{ adwords | strquotes }}]
  		});
        {%- endif -%}
    }

    function callback_google_sign_up() {
        {%- if tracking -%}
        gtag('event', 'sign_up', {
  			'send_to': [{{ tracking | strquotes }}]
  		});
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', 'sign_up', {
  			'send_to': [{{ adwords | strquotes }}]
  		});
        {%- endif -%}
    }

    function callback_google_login() {
        {%- if tracking -%}
        gtag('event', 'login', {"method":"email"});
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', 'login', {'send_to': [{{ adwords | strquotes }}]});
        {%- endif -%}
    }


    function callback_google_begin_checkout() {
        {%- if  tracking -%}
        gtag('event', 'begin_checkout', {
  			'send_to': [{{ tracking | strquotes }}],
            'value': '{{ cart.total_price }}',
            'items': [
                {%- if cart.items -%}
                {%- for product in cart.items -%}
                {
                    "item_id": "{{ product.product.id | escape}}",
                    "item_name":  "{{ product.title | escape}}",
                    "quantity": "{{ product.quantity }}",
                    "price": "{{ product.price }}"
                },
                {%- endfor -%}
                {%- endif -%}
            ],
  		});
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', 'begin_checkout', {
  			'send_to': [{{ adwords | strquotes }}]
  		});
        {%- endif -%}


        {%- if initcheckout_conversion_ids -%}
        {% for send_to_id in initcheckout_conversion_ids %}
        gtag('event', 'conversion', {'send_to': '{{send_to_id}}'});
        {%- endfor -%}
        {%- endif -%}
    }

    function callback_google_share_product(ec_data, platform) {
        {%- if tracking -%}
        gtag('event', 'share_product', {
  			'send_to': [{{ tracking | strquotes }}], 
  			'event_category':ec_data['ec_data_category'],
  			'event_label':ec_data['ec_data_spu'],
  			"value":  formatMoney(ec_data['ec_data_price'],_GET_C_SETTING_('base_currency'),'',false),
            "currency":"{{currency.standard_code}}"
  		});
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', 'share_product', {'send_to': [{{ adwords | strquotes }}]});
        {%- endif -%}
    }

    function callback_google_add_address_information() {
        {%- if tracking -%}
        gtag('event', 'checkout_progress', {
        	'send_to': [{{ tracking | strquotes }}],
        	'checkout_step': 1
        });
        gtag('event', 'add_address_information', {
        	'send_to': [{{ tracking | strquotes }}]
        });
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', 'add_address_information', {
  			'send_to': [{{ adwords | strquotes }}]
  		});
        {%- endif -%}

        {%- if add_address_information_conversion_ids -%}
        {% for send_to_id in add_address_information_conversion_ids %}
        gtag('event', 'conversion', {'send_to': '{{send_to_id}}'});
        {%- endfor -%}
        {%- endif -%}
    }

    function callback_google_add_shipping_information() {
        {%- if tracking -%}
        gtag('event', 'checkout_progress', {
        	'send_to': [{{ tracking | strquotes }}],
        	'checkout_step': 2
        });
        gtag('event', 'add_shipping_info', {
            {%- if storeConfig.google_enable_ga -%}
            'value': "{{ cart.current_subtotal_price| plus:cart.current_coupon_price | plus:cart.current_promotion_price }}",
            {%- else -%}
            'value': '{{ cart.total_price }}',
            {%- endif -%}
            'currency': '{{ cart.currency_code }}',
            'items': [
                {%- if cart.items -%}
                {%- for product in cart.items -%}
                {
                    "item_id": "{{ product.id | escape}}",
                    "item_name":  "{{ product.title | escape}}",
                    "quantity": "{{ product.quantity }}",
                    {%- if storeConfig.google_enable_ga -%}
                    "price": "{{ product.discount_price }}"
                    {%- else -%}
                    "price": "{{ product.price }}"
                    {%- endif -%}
                },
                {%- endfor -%}
                {%- endif -%}
            ],
        });
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', 'add_shipping_information', {
  			'send_to': [{{ adwords | strquotes }}]
  		});
        {%- endif -%}
        {%- if add_shipping_information_conversion_ids -%}
        {% for send_to_id in add_shipping_information_conversion_ids %}
        gtag('event', 'conversion', {'send_to': '{{send_to_id}}'});
        {%- endfor -%}
        {%- endif -%}
    }

    function callback_google_add_payment_information() {
            {%- if tracking -%}
            gtag('event', 'checkout_progress', {
            	'send_to': [{{ tracking | strquotes }}],
            	'checkout_step': 3
            });
            gtag('event', 'add_payment_info', {
                {%- if storeConfig.google_enable_ga -%}
                'value': "{{ cart.current_subtotal_price| plus:cart.current_coupon_price | plus:cart.current_promotion_price }}",
                {%- else -%}
                'value': '{{ cart.total_price }}',
                {%- endif -%}
                'currency': '{{ cart.currency_code }}',
                'items': [
                    {%- if cart.items -%}
                    {%- for product in cart.items -%}
                    {
                        "item_id": "{{ product.id | escape}}",
                        "item_name":  "{{ product.title | escape}}",
                        "quantity": "{{ product.quantity }}",
                        {%- if storeConfig.google_enable_ga -%}
                        "price": "{{ product.discount_price }}"
                        {%- else -%}
                        "price": "{{ product.price }}"
                        {%- endif -%}
                    },
                    {%- endfor -%}
                    {%- endif -%}
                ],
            });
            {%- endif -%}
            {%- if adwords -%}
            gtag('event', 'add_payment_information', {
  				'send_to': [{{ adwords | strquotes }}]
  			});
            {%- endif -%}

            {%- if add_payment_information_conversion_ids -%}
            {% for send_to_id in add_payment_information_conversion_ids %}
            gtag('event', 'conversion', {'send_to': '{{send_to_id}}'});
            {%- endfor -%}
            {%- endif -%}
    }

    function callback_google_remove_from_cart(ec_data) {
        {%- if tracking -%}
        gtag('event', 'remove_from_cart', {
  			'send_to': [{{ tracking | strquotes }}], 
  			'items': [{
  				"id": ec_data['ec_data_spu'],
  				"category": ec_data['ec_data_category'],
  				"variant": ec_data['ec_data_sku_name'].replace('<br />',', '),
  				"list_position": 1,
  				"quantity": ec_data['ec_data_quantity'],
  				"price": formatMoney(ec_data['ec_data_price'],_GET_C_SETTING_('base_currency'),'',false),
        	}],
            "value": formatMoney(ec_data['ec_data_price'] *  ec_data['ec_data_quantity'],_GET_C_SETTING_('base_currency'),'',false),
            "currency":"{{currency.standard_code}}"
        });
        {%- endif -%}
        {%- if adwords -%}
        gtag('event', 'remove_from_cart', {
  			'send_to': [{{ adwords | strquotes }}]
  		});
        {%- endif -%}
    }

    function callback_google_to_wishlist(){}

</script>
<!-- End Global Site Tag (gtag.js) - Google Analytics -->